package com.ngmaster.socket.handler;

import com.ngmaster.socket.MessageHandler;
import com.ngmaster.socket.message.ReadOrModifyReWashTimeMessage;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ReceiveReadOrModifyReWashTimeMessageHandler extends MessageHandler<ReadOrModifyReWashTimeMessage> {


    @Override
    public boolean handleMessage(ReadOrModifyReWashTimeMessage protocolMessage) {
        log.info("[ReceiveReadOrModifyReWashTimeMessageHandler] [receive] [msg:{}]", protocolMessage);
        if (protocolMessage.getSeconds() > 0) { // 表示读取
            super.handleMessage(protocolMessage);
        }
        return true;
    }

    @Override
    public String getApiUrl() {
        return super.getApiUrl() + "rw_rewash_time";
    }
}
